package org.csu.onlineedubackend.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("user")
public class User {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    private String name;// 用户姓名
    
    private String username; // 用户名（账号）
    
    private String password; // 密码
    
    private String phone; // 手机号
    
    private Integer role; // 1=学生, 2=教师, 3=管理员
    
    @TableField(value = "avatar_url")
    private String avatar; // 用户头像URL
    
    // @TableField(value = "avatar_url")
    // private String avatarUrl; // 用户头像URL
    
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt; // 创建时间

    @TableField(value = "is_face_registered")
    private Boolean isFaceRegistered; // 是否注册人脸

    // public Integer getId() { return id; }
    // public void setId(Integer id) { this.id = id; }
    // public String getUsername() { return username; }
    // public void setUsername(String username) { this.username = username; }
    // public String getPassword() { return password; }
    // public void setPassword(String password) { this.password = password; }
    // public String getName() { return name; }
    // public void setName(String name) { this.name = name; }
    // public Integer getRole() { return role; }
    // public void setRole(Integer role) { this.role = role; }
    // public String getPhone() { return phone; }
    // public void setPhone(String phone) { this.phone = phone; }
} 